package com.nail.utils;


public class PageResult {

    private int totalNum;

    private int pageNo = 1;

    private int pageSize = Integer.MAX_VALUE;

    private int begin;

    private Object data;

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getBegin() {
        return pageNo == 0 ? 0 : (pageNo-1)*pageSize;
    }

    public PageResult() {
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
